﻿using AutoMapper;
using Traceability.App.API.Application.Command.BasicTraceability;
using Traceability.App.API.Application.Command.Breed;
using Traceability.App.API.Application.Command.Deep;
using Traceability.App.API.Application.Command.Enterprise;
using Traceability.App.API.Application.Command.HealthInformation;
using Traceability.App.API.Application.Command.Img;
using Traceability.App.API.Application.Command.Slaughter;
using Traceability.App.API.Application.Command.Supplier;
using Traceability.App.Domain.Traceability;

namespace Traceability.App.API
{
    public class MyAutoMapper : Profile
    {
        public MyAutoMapper()
        {
            //溯源基本信息
            CreateMap<CreateBasicTraceabilityCommand, BasicTraceabilityModel>().ReverseMap();
            CreateMap<UpdBasicTraceabilityCommand, BasicTraceabilityModel>().ReverseMap();
            //图片
            CreateMap<CreateImgCommand, ImgInformationModel>().ReverseMap();
            //养殖基本信息
            CreateMap<CreateBreedCommand, BreedingInformationModel>().ReverseMap();
            CreateMap<UpdBreedCommand, BreedingInformationModel>().ReverseMap();
            //保健信息
            CreateMap<CreateHealthCommand, HealthInformationModel>().ReverseMap();
            CreateMap<UpdHealthCommand, HealthInformationModel>().ReverseMap();
            //养殖企业信息
            CreateMap<CreateYZEnterpriseCommand, EnterpriseModel>().ReverseMap();
            CreateMap<UpdYZEnterpriseCommand, EnterpriseModel>().ReverseMap();
            //屠宰信息
            CreateMap<CreateSlaughterCommand, SlaughterModel>().ReverseMap();
            CreateMap<UpdSlaughterCommand, SlaughterModel>().ReverseMap();
            //屠宰企业信息
            CreateMap<CreateTZEnterpriseCommand, EnterpriseModel>().ReverseMap();
            CreateMap<UpdTZEnterpriseCommand, EnterpriseModel>().ReverseMap();
            //深加工信息
            CreateMap<CreateDeepCommand, DeepProcessingModel>().ReverseMap();
            CreateMap<UpdDeepCommand, DeepProcessingModel>().ReverseMap();
            //供应商信息
            CreateMap<CreateSupplierCommand, SupplierModel>().ReverseMap();
            CreateMap<UpdSupplierCommand, SupplierModel>().ReverseMap();
            //深加工企业信息
            CreateMap<CreateSJGEnterpriseCommand, EnterpriseModel>().ReverseMap();
            CreateMap<UpdSJGEnterpriseCommand, EnterpriseModel>().ReverseMap();
        }
    }
}
